import request from '@/utils/request'

export function getEmpList(data) {
  return request({
    url: '/employee/basic/list',
    method: 'get',
    params: data
  })
}

export function nations() {
  return request({
    url: '/employee/basic/getNation',
    method: 'get'
  })
}

export function treeDeptList() {
  return request({
    url: '/employee/basic/treeDeptList',
    method: 'get'
  })
}

export function joblevels() {
  return request({
    url: '/employee/basic/getJoblevel',
    method: 'get'
  })
}

export function positions() {
  return request({
    url: '/employee/basic/getPosition',
    method: 'get'
  })
}

export function maxWorkID() {
  return request({
    url: '/employee/basic/maxWorkID',
    method: 'get'
  })
}

export function saveBasic(data) {
  return request({
    url: '/employee/basic/saveBasic',
    method: 'post',
    data
  })
}

export function updateBasic(data) {
  return request({
    url: '/employee/basic/updateBasic',
    method: 'post',
    data
  })
}

// 删除员工基本资料
export function delBasic(id) {
  return request({
    url: `/employee/basic/delBasic/${id}`,
    method: 'delete'
  })
}
